package com.lq.pc.httpclient;


import org.quartz.*;
import org.quartz.impl.JobDetailImpl;
import org.quartz.impl.StdSchedulerFactory;

import java.util.*;

public class QuartzHttpClinet {


  /*  public static void main(String[] args) throws SchedulerException {
        SchedulerFactory sf = new StdSchedulerFactory();
        Scheduler scheduler = sf.getScheduler();
        JobDetailImpl jobDetail=new JobDetailImpl();
//        jobDetail.
    }*/

    public static void main(String[] args) throws SchedulerException {
        findLongestStr("fbcabcbb");
    }
    private static int findLongestStr(String str) {
        if (str == null) return -1;
        Set set = new HashSet();
        int i = 0;
        int j = 0;
        int ans = 0;
        int len = str.length();
        while (i < len && j < len) {
            if (!set.contains(str.charAt(j))) {
                set.add(str.charAt(j));
                ans = Math.max(ans, j - i + 1);
                j++;
            } else {
                set.remove(str.charAt(i++));
            }
        }
        System.out.println(ans);
        return ans;
    }

}
